<?php

/**
 * @Author: Wang Chunsheng 2192138785@qq.com
 * @Date:   2020-03-03 03:38:05
 * @Last Modified by:   Wang Chunsheng 2192138785@qq.com
 * @Last Modified time: 2020-03-03 16:46:15
 */


use common\models\DdGoods;
use yii\helpers\Html;
use common\widgets\MyActiveForm;
use richardfan\widget\JSRegister;
use common\helpers\ImageHelper;

/* @var $this yii\web\View */
/* @var $model common\models\DdGoods */
/* @var $form yii\widgets\MyActiveForm */
?>
<div class="spec_item_item" style="float:left;margin:0 5px 10px 0;">
    <input type="hidden" class="form-control spec_item_id" name="spec_item_id[<?php echo $key ?>][<?php echo $specid ?>]" VALUE="<?php echo $specid ?>" />
    <div class="form-group ">
        <div class="row row-box">
            <div class="col-xs-2 col-sm-2 text-right"><label class="control-label" for="">名称</label></div>
            <div class="col-xs-9 col-sm-9">
                <div class="input-group">
                    <span class="input-group-btn">
                        <button class="btn btn-default" type="button" style="height:36px">
                            <input type="checkbox" id="inlineCheckbox1" class="spec_item_show" name="spec_item_show[<?php echo $spec['show'] ?>][<?php echo $specid ?>]" VALUE="1" <?php echo $spec_item_shows[$key][$specid]['spec_item_show'] == 1 ? 'checked' : '' ?>>
                        </button>
                    </span>
                    <input type=" text" class="form-control spec_item_title" name="spec_item_title[<?php echo $key ?>][<?php echo $specid ?>]" VALUE="<?php echo $items ?>" style="height:36px" />
                </div><!-- /input-group -->
            </div>
        </div>
    </div>

    <div>

        <?= $form->field($model, 'spec_item_thumb[' . $key . '][' . $specid . ']')->widget('manks\FileInput', [
            'options' => [
                'field' => 'spec_item_thumb',
                'value' => !empty($spec_item_thumbs[$key][$specid]['spec_item_thumb']) ? ImageHelper::tomeia($spec_item_thumbs[$key][$specid]['spec_item_thumb']) : '',
                'key' => $key,
                'specid' => $specid,
                'ccc' => $spec_item_thumbs[$key][$specid]['spec_item_thumb']
            ]
        ]); ?>
    </div>
</div>